package com.ziguang.redwood.admin.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

/**
 * @author Administrator
 *
 */
public class LoginValidator extends Validator {

	@Override
	protected void validate(Controller c) {
		validateRequiredString("txt_user", "nameMsg", "请输入用户名");
		validateRequiredString("txt_pwd", "passMsg", "请输入密码");
	}

	@Override
	protected void handleError(Controller c) {
		c.keepPara("txt_user");
		c.render("login.html");
	}
}
